﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Comment.ascx.cs" Inherits="Comment" %>
<%@ Register assembly="CollectionPager" namespace="SiteUtils" tagprefix="cc1" %>
<div style="float: left; width: 716px;">
    <asp:DataList ID="DataList1" runat="server" 
        onitemcommand="DataList1_ItemCommand">
        <ItemTemplate>
            <div style="float: left; width: 157px;color:Purple">
                <asp:Label ID="UserCommentLabel" runat="server" Text='<%# Eval("Username") %>'></asp:Label>
            </div>
            <div style="float: left; width: 205px; color:Purple">
                (<asp:Label ID="DateTimeCommentTextbox" runat="server" 
                    Text='<%# Eval("DateTimeComment") %>'></asp:Label>
                )</div>
            <div style="float: left; width: 611px;border:1px dotted gray;margin-left:40px">
                <asp:Label ID="ContentCommentLabel" runat="server" 
                    Text='<%# Eval("Comment") %>'></asp:Label>
            </div>
            <div style="float: right; width: 143px;">
                <div style="float: left">
                    <asp:LinkButton ID="ReportSpamButton" runat="server" 
                        CommandArgument='<%# Eval("MaComment") %>' CommandName="ReportSpam" 
                        onclick="ReportSpamButton_Click">Báo cáo spam</asp:LinkButton>
                </div>
                
                <div style="border:1px dotted gray;float:left;width:30px;margin-left:10px" runat="server">
                    <asp:Label ID="CountSpamLabel" runat="server" Text='<%# Eval("CountSpam") %>'></asp:Label>
                </div>
                
            </div>
        </ItemTemplate>
    </asp:DataList>
    <cc1:CollectionPager ID="CollectionPager1" runat="server" MaxPages="20" 
        PageSize="10">
    </cc1:CollectionPager>
    <div style="float:left;width:600px">
    
        <asp:TextBox ID="ContentCommentTextbox" runat="server" Height="124px" 
            TextMode="MultiLine" Width="568px"></asp:TextBox>
        <br />
        <asp:Button ID="PostCommentButton" runat="server" 
            onclick="PostCommentButton_Click" Text="Đăng lời bình" />
        <asp:Button ID="CancelCommentButton" runat="server" Text="Hủy bỏ" 
            onclick="CancelCommentButton_Click" />
    
        <asp:Label ID="MessageLabel" runat="server" Font-Size="Large" 
            ForeColor="#CC0000"></asp:Label>
    
    </div>

</div>

